package com.fu.mapper;

import com.fu.bean.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author 付大大
 * @description
 * @create 2021-02-02 11:37
 */
public interface StudentMapper {

    @Select("select * from student")
    public abstract List<Student> selectAll();


    @Insert("insert into student values(#{id},#{name},#{age})")
    public abstract Integer insert(Student student);

    @Update("update student set name=#{name},age=#{age} where id=#{id}")
    public abstract Integer update(Student student);


    @Delete("delete from student where id=#{id}")
    public abstract Integer delete(Integer id);


}
